package com.szz.cardecision.entity;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

public class User {
    private Long id;

    @NotBlank
    @Size(min = 3, max = 50)
    private String username;

    @NotBlank
    private String passwordHash;

    private String name;
    private String phone;

    // Basic preferences
    private Integer budgetMin;
    private Integer budgetMax;
    private String preferredBodyType; // SUV, 轿车, MPV...

    private boolean admin = false;

    private Integer points = 0;

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }
    public String getPasswordHash() { return passwordHash; }
    public void setPasswordHash(String passwordHash) { this.passwordHash = passwordHash; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public String getPhone() { return phone; }
    public void setPhone(String phone) { this.phone = phone; }
    public Integer getBudgetMin() { return budgetMin; }
    public void setBudgetMin(Integer budgetMin) { this.budgetMin = budgetMin; }
    public Integer getBudgetMax() { return budgetMax; }
    public void setBudgetMax(Integer budgetMax) { this.budgetMax = budgetMax; }
    public String getPreferredBodyType() { return preferredBodyType; }
    public void setPreferredBodyType(String preferredBodyType) { this.preferredBodyType = preferredBodyType; }
    public boolean isAdmin() { return admin; }
    public void setAdmin(boolean admin) { this.admin = admin; }
    public Integer getPoints() { return points; }
    public void setPoints(Integer points) { this.points = points; }
}